namespace go frontend_api
include 'user.thrift'
include 'order.thrift'
include 'product.thrift'
include 'cart.thrift'
include 'region.thrift'
include 'user_address.thrift'
include 'category.thrift'
include 'setting.thrift'
include 'user_report.thrift'
include "error_code.thrift"
struct ErrorResponse{
	1:  string Message  (api.body = 'message')
}

service User {
    user.LoginResponse Login(1: user.LoginRequest request) (api.post="/api/login");
    user.LogoutResponse Logout(1: user.LogoutRequest request) (api.post="/api/logout");
    user.RegisterResponse Register(1: user.RegisterRequest request) (api.post="/api/register");
    user.SendEmailResponse SendEmail(1: user.SendEmailRequest request) (api.post="/api/send-email");
    user.GetUserInfoResponse GetUserInfo(1: user.GetUserInfoRequest request) (api.get="/api/get-user-info");
}
service Order {
    order.GetOrderInfoResponse GetOrderInfo(1: order.GetOrderInfoRequest request) (api.get="/api/get-order-info");
    order.GetOrderListResponse GetOrderList(1: order.GetOrderListRequest request) (api.get="/api/get-order-list");
    order.CreateOrderResponse CreateOrder(1: order.CreateOrderRequest request) (api.post="/api/create-order");
    order.CancelOrderResponse CancelOrder(1: order.CancelOrderRequest request) (api.post="/api/cancel-order");
    order.PaymentOrderResponse PaymentOrder(1: order.PaymentOrderRequest request) (api.post="/api/payment-order");
    order.ConfirmReceiptOrderResponse ConfirmReceiptOrder(1: order.ConfirmReceiptOrderRequest request) (api.post="/api/confirm-receipt-order");
    order.GetPaymentSelectResponse GetPaymentSelect(1: order.GetPaymentSelectRequest request) (api.get="/api/get-payment-select");
}
service Product {
    product.GetProductInfoResponse GetProductInfo(1: product.GetProductInfoRequest request) (api.get="/api/get-product-info");
    product.GetProductListResponse GetProductList(1: product.GetProductListRequest request) (api.get="/api/get-product-list");
    product.MGetProductResponse MGetProduct(1: product.MGetProductRequest request) (api.post="/api/mget-product-info");
}
service Cart {
    cart.GetCartListResponse GetCartList(1: cart.GetCartListRequest request) (api.get="/api/get-cart-list");
    cart.GetCartTotalResponse GetCartTotal(1: cart.GetCartTotalRequest request) (api.get="/api/get-cart-total");
    cart.AddCartResponse AddCart(1: cart.AddCartRequest request) (api.post="/api/add-cart");
    cart.UpdateCartResponse UpdateCart(1: cart.UpdateCartRequest request) (api.post="/api/update-cart");
    cart.DeleteCartResponse DeleteCart(1: cart.DeleteCartRequest request) (api.post="/api/delete-cart");
}
service Region {
    region.GetRegionListResponse GetRegionList(1: region.GetRegionListRequest request) (api.get="/api/get-region-list");
}
service UserAddress {
    user_address.GetUserAddressListResponse GetUserAddressList(1: user_address.GetUserAddressListRequest request) (api.get="/api/get-user-address-list");
    user_address.CreateUserAddressResponse CreateUserAddress(1: user_address.CreateUserAddressRequest request) (api.post="/api/create-user-address");
    user_address.UpdateUserAddressResponse UpdateUserAddress(1: user_address.UpdateUserAddressRequest request) (api.post="/api/update-user-address");
    user_address.DeleteUserAddressResponse DeleteUserAddress(1: user_address.DeleteUserAddressRequest request) (api.post="/api/delete-user-address");
    user_address.SetDefaultUserAddressResponse SetDefaultUserAddress(1: user_address.SetDefaultUserAddressRequest request) (api.post="/api/set-default-user-address");
}
service Category {
     category.GetCategoryListResponse GetCategoryList(1: category.GetCategoryListRequest request) (api.get="/api/get-category-list");
}
service Setting {
     setting.GetContactUsSelectResponse GetContactUsSelect(1: setting.GetContactUsSelectRequest request) (api.get="/api/get-contact-us-select");
}
service UserReport {
     user_report.CreateUserReportResponse CreateUserReport(1: user_report.CreateUserReportRequest request) (api.post="/api/create-user-report");
}